<?php include("header.php"); ?>


<?php
    $category = DAOFactory::getCategorymasterDAO()->load($categoryId);
    $question = DAOFactory::getQuestionmasterDAO()->queryByCategoryMasterIdAndQuestionType($categoryId,'-1');
     
?>

      <table width="800" cellpadding="10" >
        <tr>
          <td  class="style16"><span class="style15 style14 style8"><?php echo $category->categoryName ?></span></td>
          </tr>


          <?php

          if(count($question)=="" || count($question)==0){

            echo "<tr><td width=400 height=309>No questions found for this category. <br>
                <a href='".$base."/php/index.php'>Click here</a> to go back and select another category<br><br><br><br><br><br><br><br></td></tr>";


          }else{

          ?>
          <tr>
            <td width="400" height="309" class="styleLabel" valign="top"><br>

             <?php

             for($i=0;$i<count($question);$i++){
              echo "<a href='".$base."/".$category->url."/".$question[$i]->firstLink."/".$question[$i]->url.".html' style='text-decoration:none'>".$question[$i]->question ."</a><br><br> ";
             }
              ?>
	  </td>
          
        </tr>
        <?php
         }
        ?>
      </table>



<?php include("footer.php"); ?>
